package org.aepscolombia.platform.models.entity;
// Generated Apr 8, 2014 9:37:27 AM by Hibernate Tools 3.2.1.GA


import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Producers generated by hbm2java
 */
@Entity
@Table(name="producers")
public class Producers  implements java.io.Serializable {


     private Integer idPro;
     private Entities entities;
     private String addressPro;
     private boolean status;
     private Integer createdBy;

    public Producers() {
    }

    public Producers(Integer idPro) {
        this.idPro = idPro;
    }
	
    public Producers(Entities entities, boolean status) {
        this.entities = entities;
        this.status = status;
    }
    public Producers(Entities entities, String addressPro, boolean status, Integer createdBy) {
       this.entities = entities;
       this.addressPro = addressPro;
       this.status = status;
       this.createdBy = createdBy;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_pro", unique=true, nullable=false)
    public Integer getIdPro() {
        return this.idPro;
    }
    
    public void setIdPro(Integer idPro) {
        this.idPro = idPro;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_entity_pro", nullable=false)
    public Entities getEntities() {
        return this.entities;
    }
    
    public void setEntities(Entities entities) {
        this.entities = entities;
    }
    
    @Column(name="address_pro", length=200)
    public String getAddressPro() {
        return this.addressPro;
    }
    
    public void setAddressPro(String addressPro) {
        this.addressPro = addressPro;
    }
    
    @Column(name="status", nullable=false)
    public boolean isStatus() {
        return this.status;
    }
    
    public void setStatus(boolean status) {
        this.status = status;
    }
    
    @Column(name="created_by")
    public Integer getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }

}


